import './App.css';
import { BrowserRouter as Router, Switch, Link, Route } from "react-router-dom";
import Page1 from './Page1';
import Page2 from './Page2';

function App() {
  return (
    <Router>
      <ul>
        <li>
          <Link to="/index">主页</Link>
        </li>
        <li>
          <Link to="/list">列表页面</Link>
        </li>
      </ul>
      <hr />
      <Switch>
        <Route exact path="/">
          <Page1></Page1>
        </Route>
        <Route path="/index">
          <Page1></Page1>
        </Route>
        <Route path="/list">
          <Page2></Page2>
        </Route>
      </Switch>
    </Router>
  );
}

export default App;
